home *** CD-ROM | disk | FTP | other *** search
- Path: prodigy.com!usenet
- From: ELFW44A@prodigy.com (Craig Bellet)
- Newsgroups: comp.lang.c
- Subject: Towers of Hanoi
- Date: 1 Mar 1996 00:36:23 GMT
- Organization: Prodigy Services Company 1-800-PRODIGY
- Distribution: world
- Message-ID: <4h5gq7$bmo@useneta1.news.prodigy.com>
- NNTP-Posting-Host: inugap3.news.prodigy.com
- X-Newsreader: Version 1.2
-
- Learning to program in C++. Assigned problem of moving four progressively
- larger rings sitting on a peg to another peg one ring at a time. The
- object is to move the stack of rings to another peg. A small ring may be
- placed upon a larger ring or an empty peg but not upon a larger ring. A
- third peg is to facilitate this by temporarily holding rings. The
- solution involves recursion but I am unable to figure out the algorithm.
- Any thoughts?
-
-